<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Javascript image dropdown - multiple skin</title>
<link rel="stylesheet" href="css/sample.css" />
<script src="../../jquery.min.js"></script>

<!-- <msdropdown> -->
<link rel="stylesheet" type="text/css" href="../css/dd.css" />
<link rel="stylesheet" type="text/css" href="../css/skin2.css" />
<script src="../jquery.dd.min.js"></script>
<!-- </msdropdown> -->

</head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="topmenu">
  <tr>
    <td colspan="2" class="top"><h1>Javascript image dropdown <span id="ver"></span> <a title="Download" href="http://www.marghoobsuleman.com/jquery-image-dropdown" class="small">Download</a></h1></td>
  </tr>
  <tr>
    <td width="25%"><select style="width:250px"  name="pages" id="pages">
      <option value="" selected="selected">Choose a sample page</option>
      <option value="index.html">Normal</option>
      <option value="byjson.html">By Json Data</option>
      <option value="multiple-skin.html">Multiple Skin</option>
      <option value="css-sprite.html">CSS Sprite</option>
      <option value="object-oriented-approach.html">Object Oriented Approach</option>
      <option value="object-oriented-approach-more.html">Object Oriented Approach - More</option>
      <option value="use-checkbox.html">Use Checkbox</option>
      <option value="mouse-events.html">Mouse Events</option>
      <option value="help.html">Documentation</option>
    </select></td>
    <td align="left"><a href="help.html">Documentation</a></td>
  </tr>
</table>
<form action="submitdata.php" method="post" enctype="multipart/form-data" name="frmdata">
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="tblWhite">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">Created from HTML SELECT Element</td>
  </tr>
  <tr>
    <td valign="top">
    <select style="width:200px" class="tech" name="tech" id="tech">
      <option value="calendar" data-image="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
      <option value="shopping_cart" data-image="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
      <option value="cd" data-image="../images/msdropdown/icons/icon_cd.gif" name="cd">CD</option>
      <option value="email"  data-image="../images/msdropdown/icons/icon_email.gif">Email</option>
      <option value="faq" data-image="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
      <option value="games" data-image="../images/msdropdown/icons/icon_games.gif">Games</option>
      <option value="music" data-image="../images/msdropdown/icons/icon_music.gif">Music</option>
      <option value="phone" data-image="../images/msdropdown/icons/icon_phone.gif">Phone</option>
      <option value="graph" data-image="../images/msdropdown/icons/icon_sales.gif">Graph</option>
      <option value="secured" data-image="../images/msdropdown/icons/icon_secure.gif">Secured</option>
      <option value="video" data-image="../images/msdropdown/icons/icon_video.gif">Video</option>
      <option value="cd" data-image="../images/msdropdown/icons/icon_cd.gif" name="cd">CD</option>
    </select> &nbsp;
    <select name="mycomp" id="mycomp" style="width:258px;">
  <option name="one" value="msDropDown" title="../images/msdropdown/skin2/icon-ok.gif">msDropDown</option>
  <option  name="two" value="PrototypeCombobox" title="../images/msdropdown/skin2/icon-ok.gif">Prototype Combobox</option>
  <option value="jQuery Tabs" title="../images/msdropdown/skin2/icon-ok.gif">jQuery Tabs</option>
  <option value="Common Accordion" title="../images/msdropdown/skin2/icon-ok.gif">Common Accordion</option>
</select>&nbsp;
<div style="clear:both">
<p>Flat corner - (No rounded corner)</p>
<select style="width:200px" class="tech" name="flat" id="flat">
      <option value="calendar" data-image="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
      <option value="shopping_cart" data-image="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
      <option value="cd" data-image="../images/msdropdown/icons/icon_cd.gif" name="cd">CD</option>
      <option value="email"  data-image="../images/msdropdown/icons/icon_email.gif">Email</option>
      <option value="faq" data-image="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
      <option value="games" data-image="../images/msdropdown/icons/icon_games.gif">Games</option>
      <option value="music" data-image="../images/msdropdown/icons/icon_music.gif">Music</option>
      <option value="phone" data-image="../images/msdropdown/icons/icon_phone.gif">Phone</option>
      <option value="graph" data-image="../images/msdropdown/icons/icon_sales.gif">Graph</option>
      <option value="secured" data-image="../images/msdropdown/icons/icon_secure.gif">Secured</option>
      <option value="video" data-image="../images/msdropdown/icons/icon_video.gif">Video</option>
      <option value="cd" data-image="../images/msdropdown/icons/icon_cd.gif" name="cd">CD</option>
    </select>
</div>    
    </td>
  </tr>
  <tr>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom"><input type="submit" value="Submit" /></td>
  </tr>
  <tr>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom">Source Code:</td>
  </tr>
  <tr>
    <td valign="top">
    
<code>
<pre>
&lt;script>
$(document).ready(function(e) {
	$("#tech").msDropdown();
	$("#mycomp").msDropdown({mainCSS:'blue'}); //you dont have to pass here if you have in select element- data-maincss="blue"
	$("#flat").msDropdown({roundedCorner:false}); //rounded corner is off now
});
&lt;/script>    
</pre>
</code>    
    </td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
</table>
</form>
<p>&nbsp;</p>

<script>
$(document).ready(function(e) {
	$("#tech").msDropdown(); //no need to pass main css name - it will use default theme
	$("#mycomp").msDropdown({mainCSS:'blue'}); //you dont have to pass here if you have in select element- data-maincss="blue"
	$("#flat").msDropdown({roundedCorner:false});
//no use
	try {
		var pages = $("#pages").msDropdown({on:{change:function(data, ui) {
												var val = data.value;
												if(val!="")
													window.location = val;
											}}}).data("dd");

		var pagename = document.location.pathname.toString();
		pagename = pagename.split("/");
		pages.setIndexByValue(pagename[pagename.length-1]);
		$("#ver").html(msBeautify.version.msDropdown);
	} catch(e) {
		//console.log(e);	
	}
	
	$("#ver").html(msBeautify.version.msDropdown);
});
</script>

</body>
</html>
